1. Technical Field
The present invention relates generally to the field of data processing systems, and more specifically to a method, system, and product for writing programs in a simultaneous multi-threaded processing environment. Still more particularly, the present invention relates to a method, system, and product in a simultaneous multi-threaded processing environment for testing a plurality of threads simultaneously where the threads have apparently exclusive use of a shared memory space.
2. Description of Related Art
A known method exists for testing a thread in a processor that is capable of executing one thread at a time. This method provides for testing the thread by “exercising” it. First, the thread is executed with most of the processor's features disabled. The results of the test are stored as “expected results”. The features of the processor that are turned off are typically the processor's advanced features, such as speculative execution and out-of-order execution. The thread is then executed with these features enabled, and the results of the execution are stored as “actual results”. The expected results and actual results are then compared. If they match, it is determined that the thread passed the test. If the expected and actual results do not match, it is determined that the thread did not pass the test.
Some processors are capable of processing multiple threads simultaneously. These processors are referred to as Simultaneous Multi-Threaded (SMT) processors. In order to test threads simultaneously in these processors, the process described above must be executed for each thread. However, executing the process described above for each thread simultaneously would require duplicating the test program for each thread and would require large amounts of memory space in order to store the multiple copies of the test program.
Therefore, a need exists for a method, system, and product for testing a plurality of threads simultaneously without requiring the duplication of the test program for each thread and thus reducing the amount of memory storage needed to store the test program.